<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head th:replace="fragments/header :: common_header(~{::title}, ~{}, ~{::script})">
    <title>数据字典管理</title>
    <!-- My JavaScript -->
    <script src="../../static/app/sys/dictlist.js" th:src="@{/app/sys/dictlist.js}"></script>
</head>

<body class="easyui-layout" data-options="fit:true" style="margin:2px;">

<div data-options="region:'north',title:'数据字典查询',hideCollapsedContent:false"
     style="height:100px;padding:5px 0;">
    <form id="searchForm" method="POST" class="search-form">
        <div class="form-item">
            <label class="label-top">字典类型：
                <input id="sf_type" name="type" class="easyui-textbox"/>
            </label>
        </div>
        <div class="form-item">
            <a href="javascript:void(0);" id="searchBtn" class="easyui-linkbutton primary" iconCls="e-icon fa fa-search">查询</a>
            <a href="javascript:void(0);" id="resetBtn" class="easyui-linkbutton" iconCls="e-icon fa fa-repeat">重置</a>
        </div>
    </form>
</div>
<div data-options="region:'center'">
    <table id="dictGrid" data-options="border:false"></table>
</div>

<!-- toolbar -->
<div id="dictGrid-toolbar" style="padding:5px;"><!-- 上 右 下 左  -->
    <a href="javascript:;" class="easyui-linkbutton" plain="true" permission="sys:dict:add"
       iconCls="fa fa-plus" onclick="add()">添加</a>
    <!--<a href="javascript:;" class="easyui-linkbutton" plain="true" iconCls="fa fa-trash" onclick="deletes()">删除</a>-->
    <span style="color: green;">右击显示上下文菜单</span>
</div>

<div id="cm" class="easyui-menu" style="width: 120px; display: none;">
    <div permission="sys:dict:add" onclick="add();">添加</div>
    <div permission="sys:dict:add" onclick="addSameTypeDict();">添加同类字典</div>
    <div permission="sys:dict:update" onclick="update();" data-options="iconCls:'fa fa-edit'">修改</div>
</div>

<div id="dlg" class="easyui-dialog" data-options="title:'',width:650,height:380,closed:true">
    <form id="fm" class="dlg-form" method="POST">
        <input id="fm_id" name="id" type="hidden"/>
        <fieldset>
            <legend>数据字典信息</legend>
            <div class="form-row">
                <div class="form-item">
                    <label class="label-top">字典类型：</label>
                    <input id="fm_type" name="type" class="easyui-validatebox easyui-textbox" prompt="请输入字典类型"
                           data-options="required:true"/>
                </div>
            </div>
            <div class="form-row">
                <div class="form-item">
                    <label class="label-top">展示文本：</label>
                    <input id="fm_text" name="text" class="easyui-validatebox easyui-textbox" prompt="请输入展示文本"
                           data-options="required:true"/>
                </div>
                <div class="form-item">
                    <label class="label-top">字典值：</label>
                    <input id="fm_value" name="value" class="easyui-validatebox easyui-textbox" prompt="请输入字典值"
                           data-options="required:true"/>
                </div>
            </div>
            <div class="form-row">
                <div class="form-item">
                    <label class="label-top">顺序：</label>
                    <input id="fm_sort" name="sort" class="easyui-validatebox easyui-numberbox" required="true"/>
                </div>
                <div class="form-item">
                    <label class="label-top">样式：</label>
                    <input id="fm_cls" name="cls" class="easyui-textbox"/>
                </div>
            </div>
            <div class="form-row">
                <div class="form-item" style="width:100%;">
                    <label class="label-top">备注：</label>
                    <input id="fm_note" name="note" class="easyui-textbox"
                           data-options="height:60,multiline:true" style="width: 460px;"/>
                </div>
            </div>
        </fieldset>
    </form>
</div>

<div th:replace="~{fragments/footer :: footer}">...</div>
<!-- My JavaScript -->

</body>
</html>
